package com.demo.gulimall.order.vo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * spu信息
 *
 * @author Chen Yuan
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("pms_spu_info")
public class SpuInfoVo implements Serializable {
	/** 商品id */
	@TableId(type = IdType.ID_WORKER) // 老版本
    //@TableId(type = IdType.ASSIGN_ID) // 新版本
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`id`")
	private Long id;

	/** 商品名称 */
	@TableField(value = "`spu_name`")
	private String spuName;

	/** 商品描述 */
	@TableField(value = "`spu_description`")
	private String spuDescription;

	/** 所属分类id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`catalog_id`")
	private Long catalogId;

	/** 品牌id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`brand_id`")
	private Long brandId;

	@TableField(value = "`weight`")
	private BigDecimal weight;

	/** 上架状态[0 - 下架，1 - 上架] */
	@TableField(value = "`publish_status`")
	private Byte publishStatus;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`create_time`")
	private Date createTime;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`update_time`")
	private Date updateTime;

}
